﻿<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="utf-8">
        <title>图精灵-充值开通VIP</title> 
    <meta name="keywords" content="" /> 
    <meta name="description" content="" />
        <link rel="stylesheet" type="text/css" href="Tpl+/timeread/css/public_v6.4_10.css" />
    
<link rel="stylesheet" type="text/css" href="Tpl+/timeread/css/pay_v2.1.css">

    
        <script>
            var isLogin=false;
            var is_push=false;
            var now=new Date();
            var beginTime=now.getTime();
        </script>
    
</head>
<body>
    <div class='header'>
	<div class='limit'>
		<a class='logo' href="http://616pic.com" title="图精灵"></a>
				<div class='login fn16'>
						<a class='loginin' name="登录">登录</a> 
			<span>|</span> 
			<a class="loginin" name="注册">注册</a>
					</div>
	</div>
</div>
    
<div class='vip-in' chongzhi="0"></div>
<div class='middle limit'>
	<div class='m1'>
           
           您还未登陆，请先登录哦！
        	</div>
	<div class='m2'>
				   <div style="width:255px;" name="终身VIP" taocanid="6" money="99" class='box taocan6 chose'>
		   	             			<div class='gchose'></div>
		   	    				<div class='mo  '>
					<span>¥</span>
					<em>99</em>
					<i>终身</i>
				</div>
								<div class='yh'>
					<i>限时特惠</i>
					<span>原价¥299</span>
				</div>
								<div class='intro'>全站终身任意下载</div>
			</div>
				   <div style="width:255px;" name="包年VIP" taocanid="7" money="69" class='box taocan7'>
		   	    				<div class='mo  '>
					<span>¥</span>
					<em>69</em>
					<i>一年</i>
				</div>
								<div class='intro'>全站全年任意下载</div>
			</div>
				   <div style="width:255px;" name="包年VIP" taocanid="1" money="39" class='box taocan1'>
		   	    				<div class='mo  '>
					<span>¥</span>
					<em>39</em>
					<i>一年</i>
				</div>
								<div class='intro'>每天可下载20个作品</div>
			</div>
				   <div style="width:255px;" name="包月VIP" taocanid="5" money="19" class='box taocan5'>
		   	    				<div class='mo  '>
					<span>¥</span>
					<em>19</em>
					<i>一月</i>
				</div>
								<div class='intro'>每天可下载10个作品</div>
			</div>
			</div>

	<form action="/paymoney" id="paymoney" method="post" target="_blank">
       <input type="hidden" class="type" name="type" value="1">
       <input type="hidden" class="click_type" name="click_type" value="1">    
       <input type="hidden" class="pay-money" name="pay-money" value="99" />
       <input type="hidden" class="taocan" name="taocan" value="6">
    </form>

	<div class='m3'>需支付： <span>¥<span class="paymoney">99</span></span></div>
	<div class='m4'>
		<div class='box4'>
			<div class='erwm weixin'></div>
			<div class='wchat'>
				<i></i>微信扫码支付
			</div>
		</div>
		<div class='box4 zfbys'>
			<div class='erwm my'></div>
			<a class='zfb'>
				<i></i>支付宝支付 >
			</a>
		</div>
	</div>
	<a href="/protocol" target="_blank" class='m5'>
		《图精灵会员服务协议》
	</a>
</div>

<!--充值成功填充-->
<div class='successopen' style="display:none;">
   <div class='aclose'></div>
   <div class='check'></div>
   <div class='aopen'>恭喜您成功开通<span style="color:red;" class="wenan"></span>特权会员</div>
</div>


    <!-- 侧边栏 -->
<div class='rightbar'>
    <div class="qq-ctn">
        <a href="http://wpa.qq.com/msgrd?v=3&uin=3112819470&site=qq&menu=yes" target="_blank"><i class='qq'></i></a>
        <div class="float-qq">
            <div class="arrow"></div>
            <div class="float-qq-title"><i class="icon-staff"></i><span>客服</span></div>
            <div class="online-time">在线时间：9:00-18:00</div>
            <a href="http://wpa.qq.com/msgrd?v=3&uin=3112819470&site=qq&menu=yes" class="float-qq-btn1" target="_blank">点击QQ咨询</a>
            <div class="upl-title">共享素材</div>
            <a href="javascript:;" class="float-qq-btn2">点击上传</a>
        </div>
    </div>
    <a href="/vipintro" target="_blank"><i class='huiy'></i></a>
    <a href="javascript:;"><i class='returntop'></i></a>
</div>


    <div class="layer"></div>
    <div class='loginbox' id="login">
    <div class='aclose'></div>
    <div class='loginlogo'></div>
    <a href="javascript:;" onclick="openLogin('qq')" class='qqlogin gbc'><i></i><span class="loginname_qq">QQ登录</span></a>
    <a href="javascript:;" onclick="openLogin('wechat')" class='chatlogin ybc'><i></i><span class="loginname_wx">微信登录</span></a>
    <a href="/protocol" target="_blank" class='userdeal'><input type="checkbox" name="userdeal" checked="checked">我已阅读并接受《用户协议》</a>
</div><div class='endfree' style="display:none">
    <div class='aclose'></div>
    <div class='vippower'></div>
    <div class='downover pop-msg'></div>
    <div class='joincan'>特权会员低至0.1元/天</div>
    <a href="/payment" target="_blank" class='joinvip ybc'>加入会员，马上下载</a>
</div>
<div class='upbox' style="display:none">
    <div class='aclose'></div>
    <div class='upvip pop-msg'></div>
    <a href="/payment" target="_blank" class='bevip'>升级会员</a>
</div>
<div class="captcha">
    <div class="download-tips">请输入验证码验证哦！</div>
    <div class="captcha-box"><img id="captcha-img" data-src="Tpl+/timeread/img/0db40110d06c4e338183d8632e4bb2a8.gif"></div>
    <div class="code-refresh">看不清，重新获取</div>
    <input type="text" name="captcha" class="code-input" placeholder="输入验证码">
    <div class="code-submit" id="code_submit" data-id="">提交验证码</div> 
</div>
<div class='uplcheck' style="display:none">
    <div class='aclose'></div>
    <div class="uplwarn">i</div>
    <div class='uplmsg pop-msg'>若您要上传共享内容，请您严格遵守<a href="/index/upload/protocol" target="_blank">《图精灵上传协议》</a><br>请您仔细查看遵守协议规则，并严格履行</div>
    <a href="/upload?from=new" target="_blank" class='uplcontinue'>已阅读，下一步</a>
</div>
    <div class='footer'>
    <div class='limit'>
        <div class='left'>
            <ul>
                <li><a href="/protocol" target="_blank" rel="nofollow">用户协议</a></li>
                <li><a href="/statement" target="_blank" rel="nofollow">版权声明</a></li>
                <li><a href="/about" target="_blank" rel="nofollow">关于我们</a></li>
                            </ul>
        </div>
        <div class='right1'>图精灵-Copyright © 2019 版权所有</div>
        <a href="http://www.miitbeian.gov.cn/" target="_blank" rel="nofollow" class='right'><i></i>沪ICP备18011110号-1</a>
    </div>
</div>

    
        <script src="Tpl+/timeread/js/jquery.js" ></script>
    
    <script src="Tpl+/timeread/js/public_v1.6.js"></script>
        <script src="Tpl+/timeread/js/lazyload.js" ></script>
    
<script src="Tpl+/timeread/js/jquery.qrcode.min.js"></script>
<script src="Tpl+/timeread/js/store.legacy.min_1.js"></script>
<script>
    if(isLogin==false){
        login();
        $('.loginbox').find('.aclose').remove();
    }

    function successpay(ispay){
        $('.layer').show();
        var name = $('.taocan'+ispay).attr('name');
        $('.wenan').html(name);
        $('.successopen').show();
    }

    var ispay = $('.vip-in').attr('chongzhi');
    if(ispay>0){
        successpay(ispay);
    }


    $('.box').click(function(){
  	    $('.gchose').remove();
        $(this).addClass('chose').siblings().removeClass('chose');
        $(this).append("<div class='gchose'></div>");
        var money = $(this).attr('money');
        var taocanid = $(this).attr('taocanid');
        $('.paymoney').html(money);
        $("input[name='pay-money']").val(money);
        $("input[name='taocan']").val(taocanid);
        CreateWeixin(money,taocanid);
    });

    //支付宝付款
    $('.zfbys').click(function(){
        $('#paymoney').submit();
    });

    store.remove('qrcode:1');
    store.remove('qrcode:2');
    store.remove('qrcode:3');
    store.remove('qrcode:4');
    store.remove('qrcode:5');

    var money = $("input[name='pay-money']").val();
    var ds = false;
    var flag = 0;
    var taocan = $("input[name='taocan']").val();
    if(isLogin) {
        CreateWeixin(money, taocan);
    }

    function CreateWeixin(money,taocan){
        if (isLogin == false) {
            login();
            $('.loginTopright').hide();
            return false;
        }

        var k = 'qrcode:' + taocan;
        var d = store.get(k),n = new Date().getTime() / 1000;
        var click_type = $("input[name='click_type']").val();
        if ("undefined" != typeof(d) && d.expire > n) {
            createQR(d.qrcode);
            if (ds) {
                clearInterval(ds);
            }
            flag = 0;
            ds = setInterval(function() {
                ajaxWxCallback(d.order_no, flag);
                flag += 1;
            }, 3e3);
        } else {
            $.ajax({
                type:"post",
                url:"/paymoney",
                data:{'type':2,'click_type':click_type,'pay-money':money,'taocan':taocan},
                dataType:"json",
                success:function(res) {
                    if (res.status == 0) {
                        alert('请先登录');
                    } else if (res.status != 500) {
                        createQR(res.qrcode);
                        store.set(k, {qrcode:res.qrcode,order_no:res.order_no,expire:res.expire});
                        if (ds) {
                            clearInterval(ds);
                        }
                        flag = 0;
                        ds = setInterval(function() {
                            ajaxWxCallback(res.order_no, flag);
                            flag += 1;
                        }, 3e3);
                    }
                }
            });
        }
        
    }

    function createQR(qrcode)
    {
        $('.weixin').html('');
        if (isCanvasSupported()){
            $('.weixin').qrcode({width: 140,height: 140,text:qrcode});
        } else {
            $('.weixin').html('<img src="Tpl+/timeread/img/afd0168e9bd1423bbb690a37dfc2410e.gif'+encodeURIComponent(qrcode)+'" width="140" height="140" />');
        }
    }

    function ajaxWxCallback(order_no, flag) {
        if (flag >= 300) {
            clearInterval(ds);
            ds = false;
        }
        $.ajax({
            type:"post",
            url:"/api/payCheck",
            data:"order_no=" + order_no,
            dataType:"json",
            success:function(data) {
                if (data.status == true) {
                    clearInterval(ds);
                    ds = false;
                    successpay(data.taocan);
                }
            }
        });
    }

    function isCanvasSupported(){
        var elem = document.createElement('canvas');
        return !!(elem.getContext && elem.getContext('2d'));
    }
</script>

    <script>
        window.onload = function() {
            var d = new Date();
            var a = d.getTime();
            var c = (a - beginTime) / 1000;
            // console.log(c)
        };
    </script>
</body>
</html>